import request from '@/utils/request'

// 查询直播礼物列表
export function listGift(data) {
  return request({
    url: '/sys/anchor/lives/gift/list',
    method: 'post',
    data: data
  })
}

// 查询直播礼物详细
export function getGift(id) {
  return request({
    url: `/sys/anchor/lives/gift/${id}`,
    method: 'get'
  })
}

// 新增直播礼物
export function addGift(data) {
  return request({
    url: '/sys/anchor/lives/gift/add',
    method: 'post',
    data: data
  })
}

// 修改直播礼物
export function updateGift(data) {
  return request({
    url: '/sys/anchor/lives/gift/edit',
    method: 'put',
    data: data
  })
}

// 删除直播礼物
export function delGift(id) {
  return request({
    url: `/sys/anchor/lives/gift/delete/${id}`,
    method: 'delete'
  })
}
// 上架下架
export function changeStatus(id) {
  return request({
    url: `/sys/anchor/lives/gift/shelves/${id}`,
    method: 'put'
  })
}
